package cn.hl.hm.constants;

import org.apache.commons.lang3.StringUtils;

/**
 *  用户审核状态： 
				1. 待提交
				
				2. 待审核
				
				3. 已通过
				
				4. 未通过
				
				5. 无效
 * 2016-12-29
 * @author 大和
 *
 */
public enum UserStatus {
	TO_SUBMIT("1","待提交"),
	TO_AUDIT("2","待审核"),
	PASS("3","已通过"),
	UNPASS("4","未通过"),
	INVAILD("5","无效");
	private String status;
	
	private String name;
	
	UserStatus(String status,String name){
		this.name = name;
		this.status = status;
	}
	
	
	public static UserStatus getUserStatus(String status){
		if (StringUtils.isBlank(status)) {
			return null;
		}
		for (UserStatus pm : values()) {
			if (pm.status.equals(status)) {
				return pm;
			}
		}
		return null;
	}


	public String getName() {
		return name;
	}


	public String getStatus() {
		return status;
	}
	public static void main(String[] args) {
		System.out.println(UserStatus.PASS.getName());
		System.out.println(UserStatus.PASS.getStatus());

	}
}
